import Taro, { Component } from '@tarojs/taro'
import { View, Text, Image } from '@tarojs/components'
import { DNavBar } from '@/components'
import { AtButton, AtCountdown } from 'taro-ui'
import './carorder.scss'
const bgImages = require('../assets/bgImages.png');
const check = require('../assets/check.png');
export default class CarorderBox extends Component {

    constructor(props) {
        super(props)
    }

    componentWillMount() {
        let { stauts } = this.$router.params
    }
    onTimeUp() {
        Taro.showToast({
            title: '时间到',
            icon: 'success',
            duration: 2000
        })
    }

    render() {

        return (
            <View className="b_carorder">
                <Image src={bgImages} className='b_carorder__images'></Image>
                <DNavBar title='购车订单' className='b_carorder__nav'></DNavBar>
                <View className="b_carorder__box">
                    <View className='b_carorder__header'>
                        <View className='item_title'>
                            <View className='item_title__left'>
                                <Image src={check} className='item_title__left_image'></Image>
                                <Text className='item_title__left_text'>待接单</Text>
                            </View>
                        </View>
                    </View>
                    <View className="b_carorder__content">
                        <View className='item_title'>
                            <View className='item_title__left'>
                                <Text>订单编号：</Text>
                                <Text>CL20191111001</Text>
                            </View>
                            <View className='item_title__right'>
                                <Text>剩余</Text>
                                {/* <Text>0时30分</Text> */}
                                <AtCountdown
                                    format={{ hours: ':', minutes: ':', seconds: '' }}
                                    // isSeconds={false}
                                    hours={0}
                                    minutes={30}
                                    onTimeUp={this.onTimeUp.bind(this)}
                                />
                            </View>
                        </View>
                        <View className='item_title'>
                            <Text className='item_title__left'>请等待卖家接单</Text>
                            <Text className='item_title__right'>系统将自动拒绝接单</Text>
                        </View>
                        <View className='b_carorder__content_box'>
                        </View>
                    </View>
                    <View className="b_carorder__info">
                        <View className="item_title">
                            <Text className="item_title__left">卖家公司</Text>
                            <Text className="item_title__right">广东123车辆销售公司</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">卖家联系人</Text>
                            <Text className="item_title__right">李立</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">卖家联系方式</Text>
                            <Text className="item_title__right">12312312312</Text>
                        </View>
                    </View>
                    <View className="b_carorder__info">
                        <Text className='b_carorder__info_title '>车辆信息</Text>
                        <View className="item_title">
                            <Text className="item_title__left">交易车型</Text>
                            <Text className="item_title__right">保时捷718 2018款 Cayman 2.0T</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">车源类型</Text>
                            <Text className="item_title__right">中规</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">指导价</Text>
                            <Text className="item_title__right">60.99万元</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">外观颜色</Text>
                            <Text className="item_title__right">蓝色</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">内饰颜色</Text>
                            <Text className="item_title__right">其他：绿色</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">排放标准</Text>
                            <Text className="item_title__right">国六</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">手  续</Text>
                            <Text className="item_title__right">手续齐全</Text>
                        </View>
                    </View>
                    <View className="b_carorder__info">
                        <Text className='b_carorder__info_title '>交易信息</Text>
                        <View className="item_title">
                            <Text className="item_title__left">成交数量</Text>
                            <Text className="item_title__right">1台</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">成交总价</Text>
                            <Text className="item_title__right">33.21 万元</Text>
                        </View>
                        <View className="item_title">
                            <Text className="item_title__left">订金金额</Text>
                            <Text className="item_title__right">5000元</Text>
                        </View>
                    </View>
                    <View className='b_carorder__footer'>
                        <AtButton className='item_btn'>提交登记</AtButton>
                    </View>
                </View>
            </View>
        )
    }
}
